<template>
  <div>
      id:<input type="text" v-model="id"><br>
      用户名:<input type="text" v-model="name"><br>
      密码:<input type="text" v-model="password"><br>
      状态:<input type="radio" value="0" v-model="type">普通作者
      <input type="radio" value="1" v-model="type">VIP作者<br>
      <button @click="add">添加</button> 
  </div>
</template>

<script>
export default {
    name:'author_post',
    data(){
        return{
            id:'',
            name:'',
            password:'',
            type:''
        }
    },
    methods:{
        add(){
            let data = new FormData();
            data.append('id',this.id)
            data.append('name',this.name)
            data.append('password',this.password)
            data.append('type',this.type)
            this.axios.post('yt2/',data).then(res=>{
                this.$router.push('author_get')
            })
        }
    }

}
</script>

<style>

</style>